package com.aglow.hyyff;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.aglow.updateDownload.service.UpdateDownloadService;

public class DownloadTestActivity extends AppCompatActivity {

    private TextView tv_show;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_download_test);
        tv_show = findViewById(R.id.tv_show);
        intent = new Intent(this, UpdateDownloadService.class);
        intent.putExtra("url", "http://gdown.baidu.com/data/wisegame/664b62cfb331afca/yingyongbao_7312130.apk");
        startService(intent);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        stopService(intent);
    }
}
